#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@NAME          : bbs_route.py
@TIME          : 2025/03/07 10:00:00
@AUTHOR        : chenlip
@VERSION       : 0.1.0
@DESCRIPTION   : bbs相关路由
'''
from flask import Blueprint, g, request, render_template, redirect, url_for, flash, session, abort
from flask import current_app, jsonify

from flask_login import login_user, logout_user, login_required, current_user
from flask_jwt_extended import create_access_token, create_refresh_token, jwt_required, get_jwt_identity

from app.service.sse_notifi import NotificationService # 导入sse通知服务
from app.middlewares.error_handler import route_exceptions, BusinessError
from app.common.security import sanitize_input # 导入清洗函数

from app.middlewares.rate_limit_decorator import ip_rate_limiter, rate_limit

bbs_bp = Blueprint('bbs', __name__, url_prefix='/bbs')

@bbs_bp.route('/bbsindex', methods=['GET'])
@rate_limit(type='normal')
@route_exceptions
def bbsindex():
    """ 论坛首页, 未登录用户也可以访问 """
    
    return render_template('bbs/bbsindex.html')